<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Pig Flash Music Player</title>
<style media="screen" type="text/css">
<!--
*{
	padding:0px;
	margin:0px;
}
body{
	font-size:12px;
	font-family:Verdana, Arial, Helvetica, sans-serif;
	background:#222;
	color:#999;
}
input,button{
	vertical-align:middle;
	font-size:12px;
	font-family:Verdana, Arial, Helvetica, sans-serif;
}
.mplayer{
	width:324px;
	margin:10px auto 0px;
}

.dlist{
	width:500px;
	margin:10px auto 0px;
	overflow:hidden;
}
.dlist dl{
	margin-top:5px;
}
.dlist dl dt{
	font-weight:bold;
	color:#777;
	line-height:25px;
	height:23px;
	background:#333;
	padding-left:8px;
}
.dlist dl dd{
	line-height:21px;
	padding:6px;
}
.dlist dl dd p{
	padding:4px 2px 5px 2px;
}
.debug dd span{
	display:block;
	line-height:31px;
	color:#777;
	overflow:hidden;
}
.info dd{
	line-height:27x;
}


.action dd .playurl{
	border:1px solid #666;
	background:#444;
	padding:4px;
	line-height:14px;
	color:#AAA;
	font-size:11px;
}
.action button{
	border:1px solid #555;
	background:#444;
	color:#888;
	margin-right:4px;
	line-height:14px;
	padding:1px 8px 2px 8px;
}
-->
</style>
<script src="jquery.js" type="text/javascript" language="javascript"></script>
<script type="text/javascript" language="javascript">
<!--
	var pmpid = "mplayer";
	
	$(function(){
		
		$(".action_load").click(function(){
			murl = $("input[name='playurl']").val();
			if(murl){
				SwfID(pmpid).m_load(murl);
			}
		});
		$("button[name='action_play']").click(function(){
			if($(this).attr("class")=="action_play"){
				SwfID(pmpid).m_play();
			}else if($(this).attr("class")=="action_pass"){
				SwfID(pmpid).m_pass();
			}
		});
		$(".action_stop").click(function(){
			SwfID(pmpid).m_stop();
		});
		
		
		$("button[name='tg_autoplay']").click(function(){
			if($(this).attr("class")=="autoplay_on"){
				SwfID(pmpid).PlaySet("autoplay","false");
				$(this).attr("class","autoplay_off").html("AutoPlay Off");
			}else if($(this).attr("class")=="autoplay_off"){
				SwfID(pmpid).PlaySet("autoplay","true");
				$(this).attr("class","autoplay_on").html("AutoPlay On");
			}
		});
		
		
		$("button[name='tg_loop']").click(function(){
			if($(this).attr("class")=="loop_on"){
				SwfID(pmpid).PlaySet("loop","false");
				$(this).attr("class","loop_off").html("Loop Off");
			}else if($(this).attr("class")=="loop_off"){
				SwfID(pmpid).PlaySet("loop","true");
				$(this).attr("class","loop_on").html("Loop On");
			}
		});
		
		
		
	});
	
	function SwfID(Name) {
		if (navigator.appName.indexOf("Microsoft") != -1)return window[Name];
		else return document[Name];
	}	
	
	function PigM_Run(Debug){
	
		if($(".PigMusicStateBox").size()<1) $("#mplayer").after("<div class=\"PigMusicStateBox\" style=\"display:none;\"></div>");
		pmsbox = $(".PigMusicStateBox");
		pmsbox.html(Debug);
		
		debugstate = "";
		pmsbox.find("span[class^='PigM_']").each(function(){debugstate += "<span>"+ $(this).attr("class") +" : "+ $(this).html() +"</span>";});
		$(".debug dd").html(debugstate);
		
		pmp_state = $(".PigM_state").html();
		str_playtime = $(".PigM_minutesed").html()+":"+$(".PigM_secondsed").html()+" / "+$(".PigM_minutes").html()+":"+$(".PigM_seconds").html()+" {"+$(".PigM_all100").html()+"%}";
		$(".pmp_playtime").text(str_playtime);
		$(".pmp_State").text(pmp_state);
		
		if(pmp_state == "play"){
			$("button[name='action_play']").attr("class","action_pass").text("Pass");
		}else{
			$("button[name='action_play']").attr("class","action_play").text("Play");
		}
	
		if($("span[class='PigM_autoplay']").html()!="true") $("button[name='tg_autoplay']").attr("class","autoplay_off").html("AutoPlay Off");
		if($("span[class='PigM_loop']").html()!="true") $("button[name='tg_loop']").attr("class","loop_off").html("Loop Off");
	}
	
-->
</script>
</head>
<body>
<div class="mplayer">
	<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="mplayer" width="324" height="34" align="middle">
		<param name="allowScriptAccess" value="sameDomain" />
		<param name="movie" value="mp.swf?autoplay=true" />
		<param name="quality" value="high" />
		<param name="bgcolor" value="#222222" />
		<embed src="mp.swf?autoplay=true" quality="high" bgcolor="#222222" width="324" height="34" swLiveConnect=true id="mplayer" name="mplayer" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
	</object>
</div>


<div class="dlist">
	<dl class="info">
		<dt>Info</dt>
		<dd>
			<p><strong>PlayTime:</strong> <span class="pmp_playtime"></span></p>
			<p><strong>State:</strong> <span class="pmp_State"></span></p>
		</dd>
	</dl>

	<dl class="action">
		<dt>Action</dt>
		<dd>
			<p>MusicURL: <input type="text" name="playurl" class="playurl" size="62" value="http://www.njsdd.com/yinyue/jimo.mp3" /></p>
            <p>
			<button type="button" name="action_load" class="action_load" />Load</button>
			<button type="button" name="action_play" class="action_play" />Play</button>
			<button type="button" name="action_stop" class="action_stop" />Stop</button>
			
			<button type="button" name="tg_autoplay" class="autoplay_on" />AutoPlay On</button>
			<button type="button" name="tg_loop" class="loop_on" />Loop On</button>
            </p>
		</dd>
	</dl>
    
	<dl class="list">
		<dt>Music List</dt>
		<dd><p>Unfinished...</p></dd>
	</dl>
    
	<dl class="debug">
		<dt>Debug</dt>
		<dd></dd>
	</dl>
	
	<dl class="support">
		<dt>Support</dt>
		<dd></dd>
	</dl>
	
</div>
</body>
</html>
